package com.wuyoucar.service;

import com.wuyoucar.common.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.text.ParseException;
import java.util.LinkedHashMap;

@Component
@FeignClient("provider-OrderApp")
public interface OrderService {

    //这是查询根据用户id查询该用户的所有订单
    @RequestMapping("/order/findAllOrders/{userid}")
     ResultBean getAllOrders(@PathVariable("userid") Integer userid) throws ParseException;

    //根据ordernumber移除订单
    @RequestMapping("/order/cancelOrderByOrdernumber/{ordernumber}")
   ResultBean cancelOrderByOrderid(@PathVariable("ordernumber") String ordernumber);

    //支付订单
    @RequestMapping("/order/payOrder/{ordernumber}")
    public ResultBean payOrderByOrder(@PathVariable("ordernumber") String ordernumber);

}
